package com.didispace.service.hello;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import com.didispace.User;


/**
 * Created by Administrator on 2016/9/16.
 */
@Component
public class HelloServiceFallback implements HelloService {

    @Override
    public String hello() {
        return "error";
    }

    @Override
    public String hello(@RequestParam("userName") String userName) {
        return "error";
    }

    @Override
    public User hello(@RequestHeader("userName") String userName, @RequestHeader("id") String id) {
        return new User("未知", "0");
    }

    @Override
    public String hello(@RequestBody User user) {
        return "error";
    }

}
